<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Polls libeio until all requests proceeded</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.eio-event-loop" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">eio_event_loop</h1>
  <p class="verinfo">(PECL eio &gt;= 0.0.1dev)</p><p class="refpurpose"><span class="refname">eio_event_loop</span> &mdash; <span class="dc-title">Polls libeio until all requests proceeded</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.eio-event-loop-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>eio_event_loop</strong></span>
    ( <span class="methodparam">void</span>
   ) : <span class="type">bool</span></div>

  <p class="para rdfs-comment">
  <span class="function"><strong>eio_event_loop()</strong></span> polls libeio until all requests proceeded.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.eio-event-loop-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.eio-event-loop-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <span class="function"><strong>eio_event_loop()</strong></span> returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.eio-event-loop-examples">
  <h3 class="title">范例</h3>
 <div class="example" id="example-4271">
 <p><strong>Example #1 <span class="function"><strong>eio_event_loop()</strong></span> example</strong></p>
 <div class="example-contents">
 <div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$temp_filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"eio-temp-file.tmp"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">touch</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*&nbsp;Is&nbsp;called&nbsp;when&nbsp;eio_chmod()&nbsp;finished&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_chmod_callback</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$result</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;global&nbsp;</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$result&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;!</span><span style="color: #0000BB">is_readable</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">)&nbsp;&amp;&amp;&nbsp;</span><span style="color: #0000BB">is_writable</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"eio_chmod_ok"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">eio_chmod</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0200</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">EIO_PRI_DEFAULT</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"my_chmod_callback"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">eio_event_loop</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>

<div class="example-contents"><p>以上例程的输出类似于：</p></div>
<div class="example-contents screen">
 <div class="cdata"><pre>
eio_chmod_ok
 </pre></div>
 </div>
 </div>

 </div>



 <div class="refsect1 seealso" id="refsect1-function.eio-event-loop-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">eio_poll</li>
  </ul>
 </div>


</div></div></div></body></html>